.class public Lrexsee/dialog/ChronometerDialog;
.super Lrexsee/core/widget/DivDialog;
.source "ChronometerDialog.java"


# instance fields
.field private final mContainer:Landroid/widget/LinearLayout;

.field private final mElapsed:Landroid/widget/TextView;

.field private final mLabel:Landroid/widget/TextView;

.field private final mMeter:Landroid/widget/Chronometer;

.field private final mRest:Landroid/widget/TextView;

.field private final mTimeOutRunnable:Ljava/lang/Runnable;

.field private final mTotal:Landroid/widget/TextView;


# direct methods
.method public constructor <init>(Lrexsee/core/browser/Browser;Ljava/lang/String;ILjava/lang/Runnable;ZZZLjava/lang/String;)V
    .locals 7
    .param p1, "browser"    # Lrexsee/core/browser/Browser;
    .param p2, "style"    # Ljava/lang/String;
    .param p3, "timeout"    # I
    .param p4, "timeOutRunnable"    # Ljava/lang/Runnable;
    .param p5, "showTotal"    # Z
    .param p6, "showElapse"    # Z
    .param p7, "showRest"    # Z
    .param p8, "highlightColor"    # Ljava/lang/String;

    .prologue
    .line 30
    const/4 v2, 0x0

    new-instance v3, Ljava/lang/StringBuilder;

    const-string v4, "width:wrapcontent;height:wrapcontent;window-cancelable:false;window-outside-cancelable:false;window-modeless:true;window-moveable:true;window-dim-amount:0;"

    invoke-direct {v3, v4}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v3, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    invoke-direct {p0, p1, v2, v3}, Lrexsee/core/widget/DivDialog;-><init>(Lrexsee/core/browser/Browser;Ljava/lang/String;Ljava/lang/String;)V

    .line 31
    iput-object p4, p0, Lrexsee/dialog/ChronometerDialog;->mTimeOutRunnable:Ljava/lang/Runnable;

    .line 33
    iget-object v2, p0, Lrexsee/dialog/ChronometerDialog;->styleSheet:Lrexsee/core/style/StyleSheet;

    invoke-virtual {v2}, Lrexsee/core/style/StyleSheet;->getGravity()I

    move-result v1

    .line 34
    .local v1, "gravity":I
    iget-object v2, p0, Lrexsee/dialog/ChronometerDialog;->styleSheet:Lrexsee/core/style/StyleSheet;

    iget-object v2, v2, Lrexsee/core/style/StyleSheet;->color:Ljava/lang/String;

    invoke-static {v2}, Landroid/graphics/Color;->parseColor(Ljava/lang/String;)I

    move-result v0

    .line 36
    .local v0, "color":I
    new-instance v2, Landroid/widget/TextView;

    iget-object v3, p0, Lrexsee/dialog/ChronometerDialog;->mContext:Landroid/content/Context;

    invoke-direct {v2, v3}, Landroid/widget/TextView;-><init>(Landroid/content/Context;)V

    iput-object v2, p0, Lrexsee/dialog/ChronometerDialog;->mTotal:Landroid/widget/TextView;

    .line 37
    iget-object v2, p0, Lrexsee/dialog/ChronometerDialog;->mTotal:Landroid/widget/TextView;

    invoke-virtual {v2, v1}, Landroid/widget/TextView;->setGravity(I)V

    .line 38
    iget-object v2, p0, Lrexsee/dialog/ChronometerDialog;->mTotal:Landroid/widget/TextView;

    new-instance v3, Ljava/lang/StringBuilder;

    sget-object v4, Lrexsee/core/lang/RexseeLanguage;->PREFIX_TIME_TOTAL:Ljava/lang/String;

    invoke-static {v4}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v4

    invoke-direct {v3, v4}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v4, "<font color="

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3, p8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    const-string v4, ">"

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-static {p3}, Lrexsee/core/progress/RexseeProgressCover;->second2string(I)Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    const-string v4, "</font>"

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    invoke-static {v3}, Landroid/text/Html;->fromHtml(Ljava/lang/String;)Landroid/text/Spanned;

    move-result-object v3

    invoke-virtual {v2, v3}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 39
    iget-object v2, p0, Lrexsee/dialog/ChronometerDialog;->mTotal:Landroid/widget/TextView;

    invoke-virtual {v2, v0}, Landroid/widget/TextView;->setTextColor(I)V

    .line 40
    iget-object v2, p0, Lrexsee/dialog/ChronometerDialog;->mTotal:Landroid/widget/TextView;

    const/4 v3, 0x0

    invoke-virtual {v2, v3}, Landroid/widget/TextView;->setClickable(Z)V

    .line 41
    iget-object v2, p0, Lrexsee/dialog/ChronometerDialog;->mTotal:Landroid/widget/TextView;

    const/16 v3, 0xa

    const/16 v4, 0xa

    const/16 v5, 0xa

    const/4 v6, 0x0

    invoke-virtual {v2, v3, v4, v5, v6}, Landroid/widget/TextView;->setPadding(IIII)V

    .line 42
    if-nez p5, :cond_0

    iget-object v2, p0, Lrexsee/dialog/ChronometerDialog;->mTotal:Landroid/widget/TextView;

    const/16 v3, 0x8

    invoke-virtual {v2, v3}, Landroid/widget/TextView;->setVisibility(I)V

    .line 43
    :cond_0
    new-instance v2, Landroid/widget/Chronometer;

    iget-object v3, p0, Lrexsee/dialog/ChronometerDialog;->mContext:Landroid/content/Context;

    invoke-direct {v2, v3}, Landroid/widget/Chronometer;-><init>(Landroid/content/Context;)V

    iput-object v2, p0, Lrexsee/dialog/ChronometerDialog;->mElapsed:Landroid/widget/TextView;

    .line 44
    iget-object v2, p0, Lrexsee/dialog/ChronometerDialog;->mElapsed:Landroid/widget/TextView;

    const/high16 v3, 0x41c00000    # 24.0f

    invoke-virtual {v2, v3}, Landroid/widget/TextView;->setTextSize(F)V

    .line 45
    iget-object v2, p0, Lrexsee/dialog/ChronometerDialog;->mElapsed:Landroid/widget/TextView;

    const/16 v3, 0xa

    const/4 v4, 0x5

    const/16 v5, 0xa

    const/4 v6, 0x5

    invoke-virtual {v2, v3, v4, v5, v6}, Landroid/widget/TextView;->setPadding(IIII)V

    .line 46
    iget-object v2, p0, Lrexsee/dialog/ChronometerDialog;->mElapsed:Landroid/widget/TextView;

    invoke-virtual {v2, v0}, Landroid/widget/TextView;->setTextColor(I)V

    .line 47
    iget-object v2, p0, Lrexsee/dialog/ChronometerDialog;->mElapsed:Landroid/widget/TextView;

    const/4 v3, 0x0

    const/4 v4, 0x1

    invoke-virtual {v2, v3, v4}, Landroid/widget/TextView;->setTypeface(Landroid/graphics/Typeface;I)V

    .line 48
    iget-object v2, p0, Lrexsee/dialog/ChronometerDialog;->mElapsed:Landroid/widget/TextView;

    invoke-virtual {v2, v1}, Landroid/widget/TextView;->setGravity(I)V

    .line 49
    iget-object v2, p0, Lrexsee/dialog/ChronometerDialog;->mElapsed:Landroid/widget/TextView;

    const/4 v3, 0x0

    invoke-virtual {v2, v3}, Landroid/widget/TextView;->setClickable(Z)V

    .line 50
    if-nez p6, :cond_1

    iget-object v2, p0, Lrexsee/dialog/ChronometerDialog;->mElapsed:Landroid/widget/TextView;

    const/16 v3, 0x8

    invoke-virtual {v2, v3}, Landroid/widget/TextView;->setVisibility(I)V

    .line 51
    :cond_1
    new-instance v2, Landroid/widget/TextView;

    iget-object v3, p0, Lrexsee/dialog/ChronometerDialog;->mContext:Landroid/content/Context;

    invoke-direct {v2, v3}, Landroid/widget/TextView;-><init>(Landroid/content/Context;)V

    iput-object v2, p0, Lrexsee/dialog/ChronometerDialog;->mRest:Landroid/widget/TextView;

    .line 52
    iget-object v2, p0, Lrexsee/dialog/ChronometerDialog;->mRest:Landroid/widget/TextView;

    invoke-virtual {v2, v1}, Landroid/widget/TextView;->setGravity(I)V

    .line 53
    iget-object v2, p0, Lrexsee/dialog/ChronometerDialog;->mRest:Landroid/widget/TextView;

    invoke-virtual {v2, v0}, Landroid/widget/TextView;->setTextColor(I)V

    .line 54
    iget-object v2, p0, Lrexsee/dialog/ChronometerDialog;->mRest:Landroid/widget/TextView;

    const/16 v3, 0xa

    const/4 v4, 0x0

    const/16 v5, 0xa

    const/4 v6, 0x5

    invoke-virtual {v2, v3, v4, v5, v6}, Landroid/widget/TextView;->setPadding(IIII)V

    .line 55
    iget-object v2, p0, Lrexsee/dialog/ChronometerDialog;->mRest:Landroid/widget/TextView;

    const/4 v3, 0x0

    invoke-virtual {v2, v3}, Landroid/widget/TextView;->setClickable(Z)V

    .line 56
    if-nez p7, :cond_2

    iget-object v2, p0, Lrexsee/dialog/ChronometerDialog;->mRest:Landroid/widget/TextView;

    const/16 v3, 0x8

    invoke-virtual {v2, v3}, Landroid/widget/TextView;->setVisibility(I)V

    .line 57
    :cond_2
    new-instance v2, Landroid/widget/TextView;

    iget-object v3, p0, Lrexsee/dialog/ChronometerDialog;->mContext:Landroid/content/Context;

    invoke-direct {v2, v3}, Landroid/widget/TextView;-><init>(Landroid/content/Context;)V

    iput-object v2, p0, Lrexsee/dialog/ChronometerDialog;->mLabel:Landroid/widget/TextView;

    .line 58
    iget-object v2, p0, Lrexsee/dialog/ChronometerDialog;->mLabel:Landroid/widget/TextView;

    invoke-virtual {v2, v1}, Landroid/widget/TextView;->setGravity(I)V

    .line 59
    iget-object v2, p0, Lrexsee/dialog/ChronometerDialog;->mLabel:Landroid/widget/TextView;

    iget-object v3, p0, Lrexsee/dialog/ChronometerDialog;->styleSheet:Lrexsee/core/style/StyleSheet;

    iget-object v3, v3, Lrexsee/core/style/StyleSheet;->label:Ljava/lang/String;

    invoke-static {v3}, Landroid/text/Html;->fromHtml(Ljava/lang/String;)Landroid/text/Spanned;

    move-result-object v3

    invoke-virtual {v2, v3}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 60
    iget-object v2, p0, Lrexsee/dialog/ChronometerDialog;->mLabel:Landroid/widget/TextView;

    invoke-virtual {v2, v0}, Landroid/widget/TextView;->setTextColor(I)V

    .line 61
    iget-object v2, p0, Lrexsee/dialog/ChronometerDialog;->mLabel:Landroid/widget/TextView;

    const/16 v3, 0xa

    const/4 v4, 0x0

    const/16 v5, 0xa

    const/16 v6, 0xa

    invoke-virtual {v2, v3, v4, v5, v6}, Landroid/widget/TextView;->setPadding(IIII)V

    .line 62
    iget-object v2, p0, Lrexsee/dialog/ChronometerDialog;->mLabel:Landroid/widget/TextView;

    const/4 v3, 0x0

    invoke-virtual {v2, v3}, Landroid/widget/TextView;->setClickable(Z)V

    .line 64
    new-instance v2, Landroid/widget/LinearLayout;

    iget-object v3, p0, Lrexsee/dialog/ChronometerDialog;->mContext:Landroid/content/Context;

    invoke-direct {v2, v3}, Landroid/widget/LinearLayout;-><init>(Landroid/content/Context;)V

    iput-object v2, p0, Lrexsee/dialog/ChronometerDialog;->mContainer:Landroid/widget/LinearLayout;

    .line 65
    iget-object v2, p0, Lrexsee/dialog/ChronometerDialog;->mContainer:Landroid/widget/LinearLayout;

    const/4 v3, 0x0

    invoke-virtual {v2, v3}, Landroid/widget/LinearLayout;->setClickable(Z)V

    .line 66
    iget-object v2, p0, Lrexsee/dialog/ChronometerDialog;->mContainer:Landroid/widget/LinearLayout;

    const/4 v3, 0x1

    invoke-virtual {v2, v3}, Landroid/widget/LinearLayout;->setOrientation(I)V

    .line 67
    iget-object v2, p0, Lrexsee/dialog/ChronometerDialog;->mContainer:Landroid/widget/LinearLayout;

    const/16 v3, 0x11

    invoke-virtual {v2, v3}, Landroid/widget/LinearLayout;->setGravity(I)V

    .line 68
    iget-object v2, p0, Lrexsee/dialog/ChronometerDialog;->mContainer:Landroid/widget/LinearLayout;

    iget-object v3, p0, Lrexsee/dialog/ChronometerDialog;->mTotal:Landroid/widget/TextView;

    new-instance v4, Landroid/widget/LinearLayout$LayoutParams;

    const/4 v5, -0x1

    const/4 v6, -0x2

    invoke-direct {v4, v5, v6}, Landroid/widget/LinearLayout$LayoutParams;-><init>(II)V

    invoke-virtual {v2, v3, v4}, Landroid/widget/LinearLayout;->addView(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V

    .line 69
    iget-object v2, p0, Lrexsee/dialog/ChronometerDialog;->mContainer:Landroid/widget/LinearLayout;

    iget-object v3, p0, Lrexsee/dialog/ChronometerDialog;->mElapsed:Landroid/widget/TextView;

    new-instance v4, Landroid/widget/LinearLayout$LayoutParams;

    const/4 v5, -0x1

    const/4 v6, -0x2

    invoke-direct {v4, v5, v6}, Landroid/widget/LinearLayout$LayoutParams;-><init>(II)V

    invoke-virtual {v2, v3, v4}, Landroid/widget/LinearLayout;->addView(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V

    .line 70
    iget-object v2, p0, Lrexsee/dialog/ChronometerDialog;->mContainer:Landroid/widget/LinearLayout;

    iget-object v3, p0, Lrexsee/dialog/ChronometerDialog;->mRest:Landroid/widget/TextView;

    new-instance v4, Landroid/widget/LinearLayout$LayoutParams;

    const/4 v5, -0x1

    const/4 v6, -0x2

    invoke-direct {v4, v5, v6}, Landroid/widget/LinearLayout$LayoutParams;-><init>(II)V

    invoke-virtual {v2, v3, v4}, Landroid/widget/LinearLayout;->addView(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V

    .line 71
    iget-object v2, p0, Lrexsee/dialog/ChronometerDialog;->mContainer:Landroid/widget/LinearLayout;

    iget-object v3, p0, Lrexsee/dialog/ChronometerDialog;->mLabel:Landroid/widget/TextView;

    new-instance v4, Landroid/widget/LinearLayout$LayoutParams;

    const/4 v5, -0x1

    const/4 v6, -0x2

    invoke-direct {v4, v5, v6}, Landroid/widget/LinearLayout$LayoutParams;-><init>(II)V

    invoke-virtual {v2, v3, v4}, Landroid/widget/LinearLayout;->addView(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V

    .line 73
    iget-object v2, p0, Lrexsee/dialog/ChronometerDialog;->mContainer:Landroid/widget/LinearLayout;

    invoke-virtual {p0, v2}, Lrexsee/dialog/ChronometerDialog;->addChild(Landroid/view/View;)V

    .line 75
    new-instance v2, Landroid/widget/Chronometer;

    iget-object v3, p0, Lrexsee/dialog/ChronometerDialog;->mContext:Landroid/content/Context;

    invoke-direct {v2, v3}, Landroid/widget/Chronometer;-><init>(Landroid/content/Context;)V

    iput-object v2, p0, Lrexsee/dialog/ChronometerDialog;->mMeter:Landroid/widget/Chronometer;

    .line 76
    iget-object v2, p0, Lrexsee/dialog/ChronometerDialog;->mMeter:Landroid/widget/Chronometer;

    const/16 v3, 0x8

    invoke-virtual {v2, v3}, Landroid/widget/Chronometer;->setVisibility(I)V

    .line 77
    iget-object v2, p0, Lrexsee/dialog/ChronometerDialog;->mMeter:Landroid/widget/Chronometer;

    new-instance v3, Lrexsee/dialog/ChronometerDialog$1;

    invoke-direct {v3, p0, p3, p8}, Lrexsee/dialog/ChronometerDialog$1;-><init>(Lrexsee/dialog/ChronometerDialog;ILjava/lang/String;)V

    invoke-virtual {v2, v3}, Landroid/widget/Chronometer;->setOnChronometerTickListener(Landroid/widget/Chronometer$OnChronometerTickListener;)V

    .line 92
    iget-object v2, p0, Lrexsee/dialog/ChronometerDialog;->mMeter:Landroid/widget/Chronometer;

    invoke-virtual {p0, v2}, Lrexsee/dialog/ChronometerDialog;->addChild(Landroid/view/View;)V

    .line 93
    iget-object v2, p0, Lrexsee/dialog/ChronometerDialog;->mMeter:Landroid/widget/Chronometer;

    invoke-virtual {v2}, Landroid/widget/Chronometer;->start()V

    .line 95
    return-void
.end method

.method static synthetic access$0(Lrexsee/dialog/ChronometerDialog;)Ljava/lang/Runnable;
    .locals 1

    .prologue
    .line 18
    iget-object v0, p0, Lrexsee/dialog/ChronometerDialog;->mTimeOutRunnable:Ljava/lang/Runnable;

    return-object v0
.end method

.method static synthetic access$1(Lrexsee/dialog/ChronometerDialog;)Landroid/widget/TextView;
    .locals 1

    .prologue
    .line 21
    iget-object v0, p0, Lrexsee/dialog/ChronometerDialog;->mElapsed:Landroid/widget/TextView;

    return-object v0
.end method

.method static synthetic access$2(Lrexsee/dialog/ChronometerDialog;)Landroid/widget/TextView;
    .locals 1

    .prologue
    .line 24
    iget-object v0, p0, Lrexsee/dialog/ChronometerDialog;->mRest:Landroid/widget/TextView;

    return-object v0
.end method
